1. Field of Invention
The invention relates to a building method, and particularly relates to a method and apparatus for building a three-dimensional model.
2. Description of Related Art
With the advance of the technique in image processing, the visual effect has been gradually expanded from two-dimensional (2D) plane to three-dimensional (3D) space. Typically, a single video camera is used to build a 3D image of an object. The video camera is positioned at different viewing angles to photograph the same physical object, thus obtaining a number of 2D images of the object. In addition, depth information corresponding to the 2D images are provided to carry distance information of the object in the 2D images. From the depth information, it can be derived that which 2D image is in the front of the frame, and, which one is in the rear of the frame. The depth information can accordingly be converted into 3D point clouds. Further, the rotation angle and the moving distance of the video camera can be decided according to two adjacent images' 3D point clouds. Then, according to the rotation angle and the moving distance, the two adjacent images' 3D point clouds are integrated to construct a part of the 3D image of the physical object. A complete 3D model of the physical object is generated when all 3D point cloud are integrated together.
However, as mentioned above, the two adjacent images' 3D point clouds are integrated according to the rotation angle and the moving distance of the video camera. Once a deviation occurs in calculating the rotation angle and the moving distance, the two adjacent images' 3D point clouds are unable to be integrated, which causes a failure in building the 3D model even with only a single calculation deviation. Moreover, in the typical method, the present image's 3D point cloud is integrated into the previous image's 3D point cloud following the present image is gathered and the rotation angle and the moving distance is decided. That is, the calculation deviation accumulates and cannot be corrected in real time until the 3D model is finished, which causes a 3D model very different from the physical object.